home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmiSoft / Dev / lang / amigatalk.lha / help / boopsidocs / getfont_gc.doc < prev    next >
Text File  |  1999-10-30  |  7KB  |  258 lines

  1. TABLE OF CONTENTS
  2.  
  3. getfont.gadget/--datasheet--
  4. getfont.gadget/GETFONT_GetClass
  5. getfont.gadget/--datasheet--                                                                                                                                               getfont.gadget/--datasheet--
  6.  
  7.    NAME
  8.        getfont_gc -- create getfont BOOPSI objects
  9.  
  10.    SUPERCLASS
  11.        gadgetclass
  12.  
  13.    REQUIRES
  14.        button.gadget
  15.  
  16.    DESCRIPTION
  17.        The getfont gadget class is used to get fonts and font attributes from a 
  18.        font requester in an easy and consistent way.  It consists of two button
  19.        gadgets, one read-only and one popfont button, that are used to select
  20.        the font and show the result.
  21.  
  22.        Advantages that this class provides:
  23.  
  24.        > Consistent behaviour and look in all applications using this class
  25.          instead of doing their own font selection routines.
  26.  
  27.        > Easy to use.
  28.  
  29.  
  30.     METHODS
  31.        OM_NEW -- Passed to superclass, defaults set, then OM_SET. Children
  32.                  created.
  33.  
  34.        OM_SET -- Passed to superclass, custom tags set.
  35.  
  36.        OM_GET -- Custom tag returned or passed to superclass.
  37.  
  38.        OM_UPDATE -- Passed to superclass, options set then rendered.
  39.  
  40.        OM_DISPOSE -- Children disposed of, then passed to superclass.
  41.  
  42.        GM_RENDER -- Passed to superclass, then children are rendered.
  43.  
  44.        GM_HITTEST -- Overrides superclass, returns GMR_GADGETHIT if within
  45.                  the popfile/drawer button.
  46.  
  47.        GM_HELPTEST -- Overrides superclass, returns GMR_HELPHIT if within
  48.                  the domain of the gadget.
  49.  
  50.        GM_GOACTIVE -- Passed to superclass, passed to popfile/drawer button.
  51.  
  52.        GM_HANDLEINPUT -- Overrides superclass, all input processed.
  53.  
  54.        GM_GOINACTIVE -- Passed to superclass, popfile/drawer button deactivated.
  55.  
  56.        GM_DOMAIN -- Returns GDOMAIN_MINIMUM and GDOMAIN_MAXIMUM dimensions.
  57.  
  58.        GM_KEYACTIVE -- Private method for keyboard control.
  59.  
  60.        GM_KEYINACTIVE -- Private method for keyboard control.
  61.  
  62.        GFONT_REQUEST -- getfont gadget method for invoking the font requester.
  63.  
  64.     ATTRIBUTES
  65.        Most of these tags operate the same as the ASLFO_#? tags in ASL library.
  66.        See <asl.library/AslRequest> for detailed descriptions.
  67.  
  68.        GETFONT_TitleText (STRPTR)
  69.           Requester title text.
  70.          
  71.           Defaults to NULL.
  72.          
  73.           Applicability is (OM_NEW, OM_SET).
  74.  
  75.        GETFONT_TextAttr (struct TextAttr *)
  76.           Font to show in the gadget. The textattr.ta_Style, textattr.ta_Name
  77.           and textattr.ta_YSize fields are used by the font requester 
  78.           as default values in OM_NEW and contain the information about the
  79.           font in the other methods.
  80.  
  81.           Defaults to none.
  82.  
  83.           Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
  84.  
  85.        GETFONT_DoFrontPen (BOOL)
  86.           Do front pen.
  87.  
  88.           Defaults to FALSE.
  89.  
  90.           Applicability is (OM_NEW, OM_SET).
  91.  
  92.        GETFONT_DoBackPen (BOOL)
  93.           Do back pen.
  94.  
  95.           Default to FALSE.
  96.  
  97.           Applicability is (OM_NEW, OM_SET).
  98.  
  99.        GETFONT_DoStyle (BOOL)
  100.           Do style.
  101.  
  102.           Defaults to FALSE.
  103.  
  104.           Applicability is (OM_NEW, OM_SET).
  105.  
  106.        GETFONT_DoDrawMode (BOOL)
  107.           Do draw mode.
  108.  
  109.           Defaults to FALSE.
  110.  
  111.           Applicability is (OM_NEW, OM_SET).
  112.  
  113.        GETFONT_MinHeight (UWORD)
  114.           Minimum font height.
  115.  
  116.           Defaults to 6.
  117.  
  118.           Applicability is (OM_NEW, OM_SET).
  119.  
  120.        GETFONT_MaxHeight (UWORD)
  121.           Maximum font height.
  122.  
  123.           Defaults to 20.
  124.  
  125.           Applicability is (OM_NEW, OM_SET).
  126.  
  127.        GETFONT_FixedWidthOnly (BOOL)
  128.           Only show fixed width fonts.
  129.  
  130.           Defaults to FALSE.
  131.  
  132.           Applicability is (OM_NEW, OM_SET).
  133.  
  134.        GETFONT_Height (WORD)
  135.           Height of the font requester.
  136.  
  137.           Defaults to 200.
  138.  
  139.           Applicability is (OM_NEW, OM_SET, OM_GET).
  140.  
  141.        GETFONT_Width (WORD)
  142.           Width of the font requester.
  143.  
  144.           Defaults to 300.
  145.  
  146.           Applicability is (OM_NEW, OM_SET, OM_GET).
  147.  
  148.        GETFONT_LeftEdge (WORD)
  149.           Left edge of the font requester.
  150.  
  151.           Defaults to 30.
  152.  
  153.           Applicability is (OM_NEW, OM_SET, OM_GET).
  154.  
  155.        GETFONT_TopEdge (WORD)
  156.           Top edge of the font requester.
  157.  
  158.           Defaults to 20.
  159.  
  160.           Applicability is (OM_NEW, OM_SET, OM_GET).
  161.  
  162.        GETFONT_FrontPen (UBYTE)
  163.           Front pen.
  164.  
  165.           Defaults to 1.
  166.  
  167.           Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
  168.  
  169.        GETFONT_BackPen (UBYTE)
  170.           Back pen.
  171.  
  172.           Defaults to 0.
  173.  
  174.           Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
  175.  
  176.        GETFONT_DrawMode (UBYTE)
  177.           Draw mode.
  178.  
  179.           Defaults to JAM1.
  180.  
  181.           Applicability is (OM_NEW, OM_SET, OM_GET, OM_NOTIFY).
  182.  
  183.        GETFONT_MaxFrontPen (UBYTE)
  184.           Max number of colors in front palette.
  185.  
  186.           Defaults to 255.
  187.  
  188.           Applicability is (OM_NEW, OM_SET).
  189.  
  190.        GETFONT_MaxBackPen (UBYTE)
  191.           Max number of colors in back palette.
  192.  
  193.           Defaults to 255.
  194.  
  195.           Applicability is (OM_NEW, OM_SET).
  196.  
  197.        GETFONT_ModeList (STRPTR *)
  198.           Substitute list for drawmodes.
  199.  
  200.           Defaults to none.
  201.  
  202.           Applicability is (OM_NEW, OM_SET).
  203.  
  204.        GETFONT_FrontPens (UBYTE *)
  205.           Color table for front pen palette.
  206.  
  207.           Defaults to none.
  208.  
  209.           Applicability is (OM_NEW, OM_SET).
  210.  
  211.        GETFONT_BackPens (UBYTE *)
  212.           Color table for back pen palette.
  213.  
  214.           Defaults to none.
  215.  
  216.           Applicability is (OM_NEW, OM_SET).
  217.  
  218.        GETFONT_SoftStyle (UBYTE)
  219.           SoftStyle, provided only for making mapping to button.gadget
  220.           easier. Textattr.ta_Style in the GETFONT_TextAttr attribute
  221.           will provide the style in other cases. 
  222.  
  223.           Applicability is (OM_GET, OM_NOTIFY).
  224. getfont.gadget/GETFONT_GetClass                                                                                                                                         getfont.gadget/GETFONT_GetClass
  225.  
  226.    NAME
  227.        GETFONT_GetClass -- Gets the pointer to the font requester class
  228.  
  229.    SYNOPSIS
  230.        getfont_class = GETFONT_GetClass();
  231.        D0
  232.  
  233.        Class * GETFONT_GetClass( void );
  234.  
  235.    FUNCTION
  236.        Obtains the pointer to the getfont gadget class for use with
  237.        NewObject().  This function always returns a valid pointer so
  238.        you do not need to check it.  The reason is that if the library
  239.        opens fine, then the pointer returned is already setup.  (Of course
  240.        this implies that if opening the library fails, you shouldn't be
  241.        calling this.)
  242.  
  243.        Note that this function does not create the class, that is done
  244.        when the class library is opened.
  245.  
  246.    INPUTS
  247.  
  248.    RESULT
  249.        getfont_class - Pointer to the getfont gadget class.
  250.  
  251.    EXAMPLE
  252.  
  253.    NOTES
  254.  
  255.    BUGS
  256.  
  257.    SEE ALSO
  258.